home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 July & August / PCWorld_2007-07-08_cd.bin / v cisle / multiav / Multi_AV.exe / Trend.kix < prev    next >
Text File  |  2007-05-09  |  3KB  |  101 lines

  1. ;
  2. ;  05-09-2007 // v2.00
  3. ;
  4. SETCONSOLE("hide")
  5. $SafeMode="N"
  6. $SearchString="the latest pattern file number"
  7. $home="c:\AV-CLS\Trend"
  8. $procedurefile="c:\AV-CLS\killproc.txt"
  9. $drive=left($home,2)
  10. go $drive
  11. md $home
  12. cd $home
  13. $WMICheck = ConfirmWMI()     
  14. If ($WMICheck="")=0  
  15.   Dim $objWMIServ
  16.   $objWMIServ=GetObject("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL",48)
  17.   For Each $obj In $objWMIServ
  18.     $BootupState=$obj.BootupState
  19.   Next
  20.   $BootStat=$BootupState
  21.   $BootupState=left(ucase($BootupState),6)  
  22.   if ($BootupState="NORMAL")=0 $SafeMode="Y" endif
  23. Else   
  24.   $BootStat="Undetermined"
  25.   $SafeMode="U"
  26. EndIf
  27. cls
  28. If ($SafeMode="Y")=1 and exist ("LPT$VPN.*")=1 goto SCAN endif
  29. If ($SafeMode="Y")=1 and exist ("LPT$VPN.*")=0 
  30.   if @inwin=1
  31.     BEEP
  32.     ShutDown ("","Trend Pattern File was not found. The computer is being shutdown so you can obtain the Pattern File in Normal Mode",30,1,1)
  33.     goto END
  34.   else
  35.     BEEP
  36.     messagebox("Trend Pattern File was not found. The computer is being shutdown so you can obtain the Pattern File in Normal Mode"," Trend Micro Sysclean ",48,30)
  37.     run "%windir%\RUNDLL32.EXE user.exe,ExitWindows"
  38.     goto END
  39.   endif
  40. endif
  41. gosub "GetFiles"
  42. :SCAN
  43. KillProcess()
  44. CleanCache()
  45. shell "$home\SYSCLEAN.COM"
  46. if exist ("$home\SYSCLEAN.log")=1 run "notepad $home\SYSCLEAN.log" endif
  47. :END
  48. SETCONSOLE("hide")
  49. exit
  50. ;---------------------------------------------------
  51. :GetFiles
  52.   SETCONSOLE("SHOW")
  53.   SETCONSOLE("MAXIMIZE")
  54.   SETCONSOLE("FOREGROUND")
  55.   SETTITLE ("Trend Micro Module")
  56.   Color y+/b
  57.   cls
  58.   shell "c:\AV-CLS\wget -N http://www.trendmicro.com/ftp/products/tsc/sysclean.com"
  59.   cls
  60.   shell "c:\AV-CLS\wget http://www.trendmicro.com/download/viruspattern.asp"
  61.   copy "viruspattern.asp" "pattern.txt"
  62.   del "viruspattern.asp"
  63.   IF Open(1,"pattern.txt",2)=0
  64.     cls
  65.     $x=ReadLine(1)
  66.     WHILE @ERROR=0
  67.       $x=ReadLine(1)
  68.       if (INSTR($x,$SearchString))<>0
  69.         $PatternFile=$x 
  70.         $PatternFileNumber=SUBSTR($PatternFile,val(INSTR($x,$SearchString))+len($SearchString)+9,3)
  71.         $PatternFile1="lpt"+$PatternFileNumber+".zip"
  72.       endif
  73.     LOOP
  74.     Close(1)
  75.     del "pattern.txt"
  76.   ELSE
  77.     BEEP
  78.     SETCONSOLE("SHOW")
  79.     SETCONSOLE("MAXIMIZE")
  80.     SETCONSOLE("FOREGROUND")
  81.     SETTITLE ("Trend Micro Module")
  82.     cls
  83.     ? $home+"\pattern.txt not opened for READ, error code: [" + @ERROR + "]"
  84.     sleep 10
  85.     goto END
  86.   ENDIF
  87.   if exist ("lpt???.zip")=1 del "lpt???.zip" endif
  88.   if exist ($home+"\lpt$vpn."+$PatternFileNumber)=0
  89.     cls
  90.     shell "c:\AV-CLS\wget http://www.trendmicro.com/ftp/products/pattern/"+$PatternFile1
  91.     SETCONSOLE("hide")
  92.     if exist ("LPT$VPN.???")=1 del "LPT$VPN.???" endif
  93.     go $drive
  94.     cd $home
  95.     shell "c:\AV-CLS\unzip -o $PatternFile1 lpt$vpn."+$PatternFileNumber
  96.     del $PatternFile1
  97.   endif
  98.   del "*.log"
  99.   SETCONSOLE("HIDE")
  100. return
  101.